package com.wangy.sct.serviceuser.api.service;

import com.wangy.sct.common.core.InvokeResult;
import com.wangy.sct.serviceuser.api.model.request.UserServiceReq;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * InterfaceName: UserServiceFeign <br/>
 * Description:  <br/>
 *
 * @author wangyue
 * @version V1.0.0
 * @date 2018/11/7 11:03 AM
 */
@FeignClient("USER-SERVICE")
public interface UserServiceFeign {

	@GetMapping(value = "/user/query/{userId}", produces = MediaType.APPLICATION_JSON_VALUE)
	InvokeResult queryUser(@PathVariable(value = "userId") String userId);

	@PostMapping(value = "/user/query", produces = MediaType.APPLICATION_JSON_VALUE)
	InvokeResult queryUser(@RequestBody UserServiceReq userReq);

	@GetMapping(value = "/user/queryAuthority/{userId}", produces = MediaType.APPLICATION_JSON_VALUE)
	InvokeResult queryUserAuthority(@PathVariable(value = "userId") String userId);

}
